package com.rfid.spec;

public class SpecTagAccessSet extends Spec {
    public long m_AIP = 0L;
    public long m_TID = 0L;
    public SpecTagAccess m_TagAccessList = null;
    public long m_nCount = 0L;

    public int AddTagAccess(SpecTagAccess tagAccess) {
        if (tagAccess == null) return -3;
        tagAccess.m_next = this.m_TagAccessList;
        this.m_TagAccessList = tagAccess;
        this.m_nCount++;
        return 0;
    }

    public static SpecTagAccessSet Create() {
        return new SpecTagAccessSet();
    }

    public long GetCount() {
        return this.m_nCount;
    }

    public SpecTagAccess GetTagAccessByOprCode(long oprCode) {
        SpecTagAccess p = this.m_TagAccessList;
        while (p != null) {
            if (p.m_AccessCode == oprCode) return p;
            p = (SpecTagAccess) p.m_next;
        }
        return null;
    }
}
